//
//  StrategyDetailsTableViewCell.m
//  BeautifulShoppings
//
//  Created by GivenBmli on 16/9/5.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "StrategyDetailsTableViewCell.h"
#import "UIImageView+WebCache.h"
#import "StrateDetailsModel.h"
#import "TAMacro.h"
@implementation StrategyDetailsTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self  = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatSubview];
        
    }
    return self;
}
- (void)setStrateDetailsModel:(StrateDetailsModel *)strateDetailsModel {
    self.title.text =strateDetailsModel.title;
    [self.cover_image_url sd_setImageWithURL:[NSURL URLWithString:strateDetailsModel.cover_image_url] placeholderImage:[UIImage imageNamed:@"站位"]];
    
}

-(void)creatSubview{
    
    
    self.cover_image_url = [[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH / 30, 0, SCREEN_WIDTH - SCREEN_WIDTH/ 15, SCREEN_WIDTH / 2.1)];
    self.cover_image_url.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.cover_image_url];
    
    
    UIView *viewDown = [[UIView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH / 30,SCREEN_WIDTH / 2 -SCREEN_HEIGHT / 15, SCREEN_WIDTH - SCREEN_WIDTH / 15, SCREEN_HEIGHT / 15)];
    viewDown.backgroundColor = [UIColor lightGrayColor];
    
    viewDown.alpha = 0.3;
    [self.contentView addSubview:viewDown];
    self.title = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH / 30, SCREEN_WIDTH / 2 -SCREEN_HEIGHT / 15 , SCREEN_WIDTH, SCREEN_HEIGHT / 15)];
    self.title.textColor = [UIColor blackColor];
    [self.contentView addSubview:self.title];
    
}


@end
